Dirty Water

Skills Used: C#, Unity 6, Git, Game Development, Agile

About

Dirty Water is a single player 2D game where the player cleans up the ocean while improving the lives of the residents. The game was made to advocate for both cleaner waters and against the excessive use of plastic. Players take on the role of a diver who has recently moved to the area. You will meet a shopkeeper and his granddaughter who wish the ocean was cleaner. Throughout 5 quests you help them see a cleaner ocean. Use materials you collect from the ocean to unlock upgrades to your gear. Relax to Dirty Water's OST and make the ocean beautiful. The game is designed to be cozy and easy to play.

Sam looking at the ocean Sam Talking to NPCs

What I'm most proud of

Water Shader

Sam Swimming in ocean

Using Unity Shader Graph, I implemented a water shader that represents the ocean. This shader has 3 main features. First, the water has waves that move toward the shore. These waves may be adjusted for both speed and size. Second, I added caustics that give texture to the water. Third, I added a gradient to the water such that the water will get progressively darker as the player goes deeper in the ocean. Finally, the water acts as a distortion layer to all elements behind it. In the future, I would love to also make the water reactive so that when the player jumps in, the water moves.

Parallax Background

As the player moves on the shore, the background behind them will parallax.

Event based architecture

I developed an event bus that handles all events in the game. This allows for scripts to subscribe to the event and react accordingly. This is incredibly helpful because it allows for easier to read code as well as reducing the need for direct references to game objects.

The most beneficial use of the event bus was the implementation of the quest system. The Quest System event controller allows for quests to be started and finished from anywhere. This allowed flexibility with creating quests. Furthermore, NPCs subscribe to quest events and know how to react to a quest being finished.

The Event bus is also great for other uses such as an event for when the day ends. The player controller can react accordingly by placing the player back on land and switching the movement scheme to walking vs swimming.

The player controller

One of the challenges of development was finding a way to allow the player to both walk on land and swim in the ocean. The challenge is the player must only move left and right on land, but must be able to move in all directions in the ocean. Furthermore, the sprite must change between walking and swimming. Utilizing the event bus, I have he player controller reacting to when the player chooses to enter the water so all elements may switch to swimming.

Controller and Keyboard Compatibility

One of the goals going into the game was to allow for both controller and keyboard compatibility. The game is recommended to be played with a controller, but we wanted to allow for keyboard functionality as well without comprising game feel. Using the new Unity Input System, I was able to implement functionality for both a controller and a keyboard without complicating the code. Inputs were given action names and could be utilized as such in the code. For example instead of checking for if the space bar or if the A button were pressed, we instead check if the jump action was triggered.

Development

This game was made by a team of people for Alternative Game Development at the University of Utah. I worked on this project as the lead software engineer. Much thanks to my team members Madi Behunin, Camren Howard, Tom Glasmann, Hardy Farnsworth, and Tanner Zaitzeff-Johnson for their hard work on this project.